<!-- right-->

<div class="MemberMain">
  <div style="height:auto">
    <div class="MemberMain-bg">
      <div class="title" ><{t}>您好<{/t}>，<font color="#FF6600"><{if $member.name==''}><{$member.uname}><{else}><{$member.name}><{/if}>  </font><{if $member.sex=='male'}>&nbsp;<{t}>先生<{/t}><{elseif $member.sex=='female'}>&nbsp;<{t}>女士<{/t}><{/if}>,<{t}>欢迎进入会员中心<{/t}></div>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td style="border-right:1px dotted #ccc"><div class="MemberMain-left">
              <ul>
                <li><{t}>您目前是：<{/t}><span class="point">[<{$member.levelname}>]</span><{if $switch_lv.switch_type == 0 && $switch_lv.show eq 'YES'}>（<{t}>积分累积到<{/t}><{$switch_lv.lv_data}><{t}>可成为<{/t}><{$switch_lv.lv_name}>）<{/if}></li>
                <li><{t}>经验值是：<{/t}><span class="point"><{$member.experience}></span><{if $switch_lv.switch_type == 1 && $switch_lv.show eq 'YES'}>（<{t}>经验值累积到<{/t}><{$switch_lv.lv_data}><{t}>可成为<{/t}><{$switch_lv.lv_name}>）<{/if}></li>
                <li>
                  <div class="left"><{t}>目前账户总积分：<{/t}><span class="point" ><{$member.point}></span></div>
				  <{if $extend_point_html}><div class="center"><{$extend_point_html}></div><{/if}>
                  <div class="right"><a class="link" href="<{link app=b2c ctl='site_member'  full='1' act='point_history'}>"><{t}>查看积分历史>><{/t}></a></div>
                </li>
                <li style="border:none; clear:both">
                  <div style="padding:0 2px; float:left"><{t}>预存款余额：<{/t}><b class="point"><{$def_cur_sign}></b><span class="point"><{$aNum}></span></div>
                  <div style="padding:0 2px; float:right"><a class="link" href="<{link app=b2c ctl='site_member'  full='1' act='deposit'}>"><{t}>去充值>><{/t}></a></div>
                </li>
              </ul>
            </div></td>
          <td width="50%" style="border-left:1px dotted #fff"><div class="MemberMain-right">
              <h4 class="head">
                <div><{t}>促销活动<{/t}></div>
              </h4>
              <table cellspacing="0" cellpadding="0" border="0" style="margin:5px 10px">
                <tr>
                  <td width="70%"><ul>
                      <{foreach from=$wel item="wel" name=wel}>
                      <li> <{$wel.name}></li>
                      <{/foreach}>
                    </ul></td>
                </tr>
              </table>
            </div></td>
        </tr>
      </table>
      <div style="clear:both; *height:8px"></div>
    </div>
    <{if !$orders}>
    <div style="clear:both; margin-top:5px">
    <div class="title title-bg" style="padding:0"><div><span style="float:left"><{t}>最近订单<{/t}></span></div></div>
    <div class="favorites"><div class="noinfo"><{t}>暂无订单<{/t}></div></div></div>
    <{else}>
    <div class="title-bg">
      <div><span style="float:left"><{t}>最近订单<{/t}></span> <span style="float:right"><a  style="font-weight:100" href="<{link app=b2c ctl=site_member act=orders}>"><{t}>所有订单<{/t}>>></a></span></div>
    </div>
    <table class="gridlist" width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <th><{t}>商品名称<{/t}></th>
        <th><{t}>订单号<{/t}></th>
        <th><{t}>下单日期<{/t}></th>
        <th><{t}>总金额<{/t}></th>
        <th><{t}>订单状态<{/t}></th>
        <th><{t}>操作<{/t}></th>
      </tr>
      <{foreach from=$orders item="order" name=orders key="key"}>
      <tr  <{if ($key+1)%2 == 0}>class="order_list_tr"<{/if}>>
        <td width="33%">
		<{if $order.goods_items}>
          <{foreach from=$order.goods_items item=item_goods name=goods_item}>
          <div <{if end($order.goods_items)!=$item_goods}> style="border-bottom:1px dotted #ddd; margin:0 0 5px 0; padding:2px 0" <{/if}>> <a target="_blank" href="<{link app=b2c ctl="site_product" act="index" arg0=$item_goods.goods_id}>">
            <{$item_goods.name}><{if $item_goods.attr}>(<{$item_goods.attr}>)<{/if}> </a> </div>
          <{/foreach}>
		<{/if}>
          <{if $order.gift_items}>
          <{foreach from=$order.gift_items item=item_gift name=gift_item}>
          <div <{if end($order.gift_items)!=$item_gift}> style="border-bottom:1px dotted #ddd; margin:0 0 5px 0; padding:2px 0" <{/if}>> <a target="_blank" href="<{$item_gift.link_url}>">
            <{$item_gift.name}><{if $item_gift.attr}>(<{$item_gift.attr}>)<{/if}> </a> </div>
          <{/foreach}>
		  <{/if}>
		  <{if $order.extends_items}>
			<{foreach from=$order.extends_items item=item_extends name=item_extends}>
				<{foreach from=$item_extends.info item=extend name=item}>
				 <div <{if end($item_extends.info)!=$extend}> style="border-bottom:1px dotted #ddd; margin:0 0 5px 0; padding:2px 0" <{/if}>> <a target="_blank" href="<{$extend.link_url}>">
					<{$extend.name}><{if $extend.attr}>(<{$extend.attr}>)<{/if}> </a> </div>
				<{/foreach}>
			<{/foreach}>
          <{/if}> </td>
        <td class="order-link"><{$order.order_id}></td>
        <td><{$order.createtime|cdate:FDATE_STIME}></td>
        <td  class="point"><{$order.cur_amount|cur_odr:$order.currency:false:true}></td>
        <td><span> <{if $order.status == 'finish'}><{t}>已完成<{/t}>
          <{elseif $order.status == 'dead'}><{t}>已作废<{/t}>
          <{else}>
          <{if $order.pay_status==1}><{t}>已付款<{/t}>
          [<{if $order.ship_status==1}>
          <{t}>已发货<{/t}>
          <{elseif $order.ship_status==2}>
          <{t}>部分发货<{/t}>
          <{elseif $order.ship_status==3}>
          <{t}>部分退货<{/t}>
          <{elseif $order.ship_status==4}>
          <{t}>已退货<{/t}>
          <{else}>
          <{t}> 正在备货...<{/t}>
          <{/if}>]
          <{elseif $order.pay_status==2}>
          <{t}>已付款至担保方<{/t}>
          <{elseif $order.pay_status==3}> <a href="<{link app=b2c ctl=site_member act=orderPayments arg0=$order.order_id}>" ><{t}><{t}>等待补款<{/t}></a> <{if $order.ship_status==1}>
          <{t}>[已发货]<{/t}>
          <{elseif $order.ship_status==2}>
          <{t}>[部分发货]<{/t}>
          <{elseif $order.ship_status==3}>
          <{t}>[部分退货]<{/t}>
          <{elseif $order.ship_status==4}>
          <{t}>[已退货]<{/t}>
          <{/if}>
          <{elseif $order.pay_status==4}>
          <{t}> 部分退款<{/t}>
          [<{if $order.ship_status==1}>
          <{t}>已发货<{/t}>
          <{elseif $order.ship_status==2}>
          <{t}>部分发货<{/t}>
          <{elseif $order.ship_status==4}>
          <{t}>已退货<{/t}>
          <{elseif $order.ship_status==0}>
          <{t}>未发货<{/t}>
          <{/if}>]
          <{elseif $order.pay_status==5}>
          <{t}>已退款<{/t}>
          [<{if $order.ship_status==1}>
          <{t}>已发货<{/t}>
          <{elseif $order.ship_status==2}>
          <{t}> 部分发货<{/t}>
          <{elseif $order.ship_status==4}>
          <{t}>已退货<{/t}>
          <{elseif $order.ship_status==0}>
          <{t}>未发货<{/t}>
          <{/if}>]
          <{else}> <{if $order.payinfo.pay_app_id != '-1'}><a href="<{link app=b2c ctl=site_member act=orderPayments arg0=$order.order_id}>" ><{/if}><{t}>等待付款<{/t}><{if $order.payinfo.pay_app_id != '-1'}></a><{/if}> <{if $order.ship_status==1}>
          <{t}>[已发货]<{/t}>
          <{elseif $order.ship_status==2}>
          <{t}>[部分发货]<{/t}>
          <{elseif $order.ship_status==3}>
          <{t}>[部分退货]<{/t}>
          <{elseif $order.ship_status==4}>
          <{t}>[已退货]<{/t}>
          <{/if}>
          <{/if}>
          <{/if}> </span></td>
        <td style="padding-top:13px"><{if $order.pay_status=='0' || $order.pay_status=='3'}><{if $order.payinfo.pay_app_id != '-1'}><a href="<{link app=b2c ctl="site_member" act="orderPayments" arg0=$order.order_id}>" ><{/if}><{t}>去付款<{/t}><{if $order.payinfo.pay_app_id != '-1'}></a><{/if}><br /><{/if}><a href="<{link app=b2c ctl="site_member" act="orderdetail" arg0=$order.order_id}>"><{t}>查看订单<{/t}></a></td>
      </tr>
      <{/foreach}>
    </table>
    <{/if}> <br />
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="49%"><div class="title-bg">
            <div><span style="float:left"><{t}>最近收藏<{/t}></span><span style="float:right"><a style="font-weight:100" href="<{link app=b2c ctl=site_member act=favorite}>"><{t}>所有收藏<{/t}>>></a></span></div>
          </div>
          <div class="favorites"> <{if !$favorite}>
            <div class="noinfo"><{t}>暂无收藏<{/t}></div>
            <{/if}>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> <{foreach from=$favorite item="favorite" name=favorite}>
                <{if $smarty.foreach.favorite.iteration<=5}>
                <td><dl>
                    <dt> <a href="<{link app=b2c ctl=site_product act=index arg0=$favorite.goods_id}>"><img style="width:116px; height:120px;overflow:hidden;" src="<{if $favorite.udfimg == 'true'}><{$favorite.thumbnail_pic|storager:'s'}><{else}><{$favorite.image_default_id|default:$defaultImage|storager:'s'}><{/if}>" /></a></dt>
                    <dd><a href="<{link app=b2c ctl=site_product act=index arg0=$favorite.goods_id}>"><{$favorite.name}></a></dd>
                    <dd><{t}>现价：<{/t}><span class="point"><{$favorite.price}></span></dd>
                  </dl></td>
                <{/if}>
                <{/foreach}> </tr>
            </table>
          </div></td>
      </tr>
    </table>
  </div>
  </td>
  </tr>
  </table>
</div>

<!-- right-->
<script>
/*小图mouseenter效果*/
window.addEvent('domready',function(){

  var cart_product_img_viewer=new Element('div',{styles:{'position':'absolute','zIndex':500,'opacity':0,'border':'1px #666 solid'}}).inject(document.body);

  var cpiv_show=function(img,event){

      if(!img)return;
      cart_product_img_viewer.empty().adopt($(img).clone().removeProperties('width','height').setStyle('border','1px #fff solid')).fade(1);

      var size = window.getSize(), scroll = window.getScroll();
        var tip = {x: cart_product_img_viewer.offsetWidth, y: cart_product_img_viewer.offsetHeight};
        var props = {x: 'left', y: 'top'};
        for (var z in props){
            var pos = event.page[z] + 10;
            if ((pos + tip[z] - scroll[z]) > size[z]) pos = event.page[z] - 10 - tip[z];
            cart_product_img_viewer.setStyle(props[z], pos);
        }

  };

   $$('.gridlist .product-list-img').each(function(i){

       new Asset.image(i.get('isrc'),{onload:function(img){
	   if(!img)return;
           var _img=img.zoomImg(50,50);
		     if(!_img)return;
           _img.setStyle('cursor','pointer').addEvents({
              'mouseenter':function(e){
                 cpiv_show(_img,e);
              },
              'mouseleave':function(e){
                cart_product_img_viewer.fade(0);
              }
           });
           i.empty().adopt(new Element('a',{href:i.get('ghref'),target:'_blank',styles:{border:0}}).adopt(_img));
       },onerror:function(){
            i.empty();

       }});

   });

});
</script>
